// 合同状态
export const CONTRACT_STATUS_TEXT: { [k: number | string]: string } = {
  0: '待提交',
  1: '待签署',
  2: '签署中-待财务确认',
  4: '已作废',
  5: '已确认',
  6: '签署中-待跟单确认',
  7: '签署中-待供管确认',
  null: '-',
}

export const CONTRACT_STATUS_OPTIONS = [
  { label: '待提交', value: 0 },
  { label: '待签署', value: 1 },
  { label: '签署中-待财务确认', value: 2 },
  { label: '已作废', value: 4 },
  { label: '已确认', value: 5 },
  { label: '签署中-待跟单确认', value: 6 },
  { label: '签署中-待供管确认', value: 7 },
]
// 订单合同状态
export const ORDER_CONTRACT_STATUS_TEXT: { [k: number | string]: string } = {
  0: '待提交',
  1: '待签署',
  2: '签署中-待财务确认',
  5: '已确认',
  6: '签署中-待跟单确认',
  7: '签署中-待供管确认',
  null: '-',
}

export const ORDER_CONTRACT_STATUS_OPTIONS = [
  { label: '待提交', value: 0 },
  { label: '待签署', value: 1 },
  { label: '签署中-待财务确认', value: 2 },
  { label: '已确认', value: 5 },
  { label: '签署中-待跟单确认', value: 6 },
  { label: '签署中-待供管确认', value: 7 },
]

//合并状态
export const MERGE_STATUS_TEXT: { [k: number | string]: string } = {
  0: '未合并',
  1: '已合并',
  null: '-',
}

export const MERGE_STATUS_OPTIONS = [
  { label: '未合并', value: 0 },
  { label: '已合并', value: 1 },
]

//采购方式
export const PURCHASEWAY_TEXT: { [k: number | string]: string } = {
  0: '集采',
  1: '现采',
  null: '-',
}

export const PURCHASEWAY_OPTIONS = [
  { label: '集采', value: 0 },
  { label: '现采', value: 1 },
]
export const PURCHASEWAY_OPTIONS_NAME = [
  { label: '集采', value: '集采' },
  { label: '现采', value: '现采' },
]
// 畅平滞标签
export const CPZ_OPTIONS = [
  { label: '畅销', value: '畅销' },
  { label: '平销', value: '平销' },
  { label: '滞销', value: '滞销' },
]

//首单/返单
export const FIRST_ORDER_RETURN_ORDER_TEXT: { [k: number | string]: string } = {
  0: '首单',
  1: '返单',
  null: '-',
}

export const FIRST_ORDER_RETURN_ORDER_OPTIONS = [
  { label: '首单', value: 0 },
  { label: '返单', value: 1 },
]

// 订单账期状态
export const ORDER_ACCOUNTING_STATUS_TEXT: { [k: number | string]: string } = {
  0: '待确认',
  1: '已确认',
  null: '-',
}
export const ORDER_ACCOUNTING_STATUS_OPTIONS = [
  { label: '待确认', value: 0 },
  { label: '已确认', value: 1 },
]
export const ORDER_ACCOUNTING_STATUS_OPTIONS_SUPPLIER = [{ label: '已确认', value: 1 }]

// 订单状态
export const ORDER_STATUS_TEXT: { [k: number | string]: string } = {
  0: '待提交',
  1: '待审核',
  2: '生产中',
  3: '已完成-全部收货',
  4: '已取消',
  5: '已完成-部分收货',
  null: '-',
}

export const ORDER_STATUS_OPTIONS = [
  { label: '待提交', value: 0 },
  { label: '待审核', value: 1 },
  { label: '生产中', value: 2 },
  { label: '已完成-全部收货', value: 3 },
  { label: '已取消', value: 4 },
  { label: '已完成-部分收货', value: 5 },
]
export const ORDER_STATUS_OPTIONS_SUPPLIER = [{ label: '生产中', value: 2 }]

export const ORDER_STATUS_TRACKING_OPTIONS = [
  { label: '生产中', value: 2 },
  { label: '已完成', value: '#' },
]

// QC质检阶段
export const QC_STATGE_TEXT: { [k: number | string]: string } = {
  1: '产前会',
  2: '初期',
  3: '中期',
  4: '尾查',
  null: '-',
}
export const QC_STATGE_OPTIONS = [
  { label: '产前会', value: 1 },
  { label: '初期', value: 2 },
  { label: '中期', value: 3 },
  { label: '尾查', value: 4 },
]

// QC状态
export const QC_STATUS_TEXT: { [k: number | string]: string } = {
  1: '待回复',
  2: '已完成-已通过',
  3: '已完成-未通过',
  4: '已取消',
  5: '待执行',
  null: '-',
}
export const QC_STATUS_OPTIONS = [
  { label: '待回复', value: 1 },
  { label: '已完成-已通过', value: 2 },
  { label: '已完成-未通过', value: 3 },
  { label: '已取消', value: 4 },
  { label: '待执行', value: 5 },
]

// 返单状态
export const LINKORDERCODE_STATUS_TEXT: { [k: number | string]: string } = {
  0: '待提交',
  1: '待审核',
  2: '生产中',
  3: '已完成',
  4: '已取消',
  null: '-',
}

export const LINKORDERCODE_STATUS_OPTIONS = [
  { label: '待提交', value: 0 },
  { label: '待审核', value: 1 },
  { label: '生产中', value: 2 },
  { label: '已完成', value: 3 },
  { label: '已取消', value: 4 },
]

// 订单来源
export const ORDER_SOURCE_TEXT: { [k: number | string]: string } = {
  1: '扫码发货',
  2: '直接发货',
  null: '-',
}

export const ORDER_SOURCE_OPTIONS = [
  { label: '扫码发货', value: 1 },
  { label: '直接发货', value: 2 },
]

// 预约发货单状态
export const RESERVE_INVOICE_STATUS_TEXT: { [k: number | string]: string } = {
  1: '待审核',
  2: '待发货',
  3: '待收货',
  4: '已收货',
  5: '已取消',
  6: '待扫码',
  null: '-',
}
export const RESERVE_INVOICE_STATUS_OPTIONS = [
  { label: '待审核', value: 1 },
  { label: '待发货', value: 2 },
  { label: '待收货', value: 3 },
  { label: '已收货', value: 4 },
  { label: '已取消', value: 5 },
  { label: '待扫码', value: 6 },
]

// 箱唛状态
export const BOXMARK_STATUS_TEXT: { [k: number | string]: string } = {
  1: '已装箱',
  2: '已作废',
  3: '待装箱',
  4: '已预约发货',
  null: '-',
}
export const BOXMARK_STATUS_OPTIONS = [
  { label: '已装箱', value: 1 },
  { label: '已作废', value: 2 },
  { label: '待装箱', value: 3 },
  { label: '已预约发货', value: 4 },
]

// 箱唛类型
export const BOXMARK_TYPE_TEXT: { [k: number | string]: string } = {
  1: '整箱',
  2: '尾箱',
  null: '-',
}
export const BOXMARK_TYPE_OPTIONS = [
  { label: '整箱', value: 1 },
  { label: '尾箱', value: 2 },
]
// 意向订单状态
export const INTENT_ORDER_TYPE_OPTIONS = [
  { label: '待供应链回复', value: 0 },
  { label: '待企划确认', value: 1 },
  { label: '已下单', value: 2 },
  { label: '已取消', value: 3 },
]
//意向采购单状态颜色
export const intentBadgeColorMap: { [k: number | string]: string } = {
  0: 'gold',
  1: 'purple',
  2: 'green',
  3: 'volcano',
}
// 意向状态
export const INTENT_STATUS_TEXT: { [k: number | string]: string } = {
  0: '待供应链回复',
  1: '待企划确认',
  2: '已下单',
  3: '已取消',
  null: '-',
}

export const INTENT_ORDER_TYPE_MAP: Record<string, any> = {
  0: '待供应链回复',
  1: '待企划确认',
  2: '已下单',
  3: '已取消',
}
// 到货预警情况
export const ARRIVAL_WARNING_STATUS_OPTIONS = [
  { label: '即将超时', value: 1 },
  { label: '超时未到货', value: 2 },
  { label: '超时到货', value: 3 },
]

export const TRANSFER_TYPE_OPTIONS = [
  { label: '优先调拨加盟仓', value: 1 },
  { label: '优先调拨直营仓', value: 2 },
  { label: '按比例分配', value: 3 },
]

export const TRANSFER_TYPE_TEXT: Record<string, any> = {
  1: '优先调拨加盟仓',
  2: '优先调拨直营仓',
  3: '按比例分配',
}
